#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll t;
void solve(){
	ll n,s;
	cin>>n>>s;
	ll sum=0;
	ll arr[3]={0};
	for (int i=1;i<=n;i++){
		ll x;
		cin>>x;
		arr[x]++;
		sum+=x;
	}
	if (s<sum || s-sum==1){
		while(arr[0]--)cout<<0<<" ";
		while(arr[2]--)cout<<2<<" ";
		while(arr[1]--)cout<<1<<" ";
		
		cout<<endl;
	}else{
		cout<<"-1"<<endl;
	}
	
}
int main(){
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	
	cin>>t;
	while(t--){
		solve();
	} 
	return 0;
} 
